﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="AdManage.aspx.cs" Inherits="Manage_AdManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/JsBase/swfupload/swfupload.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/SwfUploadHelper.js"></script> 
<script type="text/javascript" src="/Manage/Js/AdManage.js"></script>

<script type="text/javascript">
    ModelOfAD =<%=JSONHelper.ObjectToJson<AdInfo>(new AdInfo()) %>;
    ModelOfContent = <%=new ADContents().ToJsonString() %>;
    SessionID ='<%=Session.SessionID %>';
</script>
<br />
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr class="HeadTitle">
    <td colspan="8" align="left">&gt;&gt;广告管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="center">广告位置</td>
    <td width="80" align="center">广告数量</td>
    <td width="100" align="center">广告宽度</td>
    <td width="100" align="center">广告高度</td>
    <td width="200" align="center">最后调整日期</td>
    <td width="200" align="center">创建日期</td>
    <td width="200" align="center">管理 [<a href="javascript:Add();" class="red">添加广告位置</a>] </td>
  </tr>

  <%
      if (listOfAds != null)
      {
          for (int i = 0; i < listOfAds.Count; ++i)
          {
              ADs a = listOfAds[i];
  %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=i+1 %>.</td>
    <td align="center"><%=a.ADName %></td>
    <td align="center" class="blue bold"><%=a.AdNums %></td>
    <td align="center" ><%=a.AdWidth %></td>
    <td align="center"><%=a.AdHeight %></td>
    <td align="center"><%=a.LastModifyDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><%=a.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[ <a href="javascript:Edit(<%=a.ADID %>);">编辑</a> ] [ <a href="javascript:Delete(<%=a.ADID %>);">删除</a> ]    </td>
  </tr>
   <%}
      }
      else
      { %>
      <tr>
    <td colspan="8" align="center" class="red">[ 未找到任何信息！]</td>
    </tr>
    <%} %>
</table>

</asp:Content>

